package com.jdl.iscm.entity.enums;

/**
 * 维度枚举类
 *
 * @Author: Ran
 * @Date: 2021/8/17
 **/
public enum StockDimensionEnum {

    SKU("SKU"), NoSKU("非SKU"), WH("库节点"), BAND("BAND"), KIND("商品分类"), Global("全局兜底");

    private final String code;

    StockDimensionEnum(String code) {
        this.code = code;
    }

    public String code() {
        return this.code;
    }

    public static StockDimensionEnum ofCode(String code) {
        for (StockDimensionEnum value : StockDimensionEnum.values()) {
            if (value.code().equals(code)) {
                return value;
            }
        }
        return null;
    }
}
